.permission-table {
    color: var(--permission-text-primary) !important;
    background: var(--permission-bg-primary) !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--permission-shadow-light);
    transition: all 0.3s ease;

    &__table {
        // 表格整体样式
        :deep(.ant-table) {
            background: var(--permission-bg-primary);
            color: var(--permission-text-primary);
        }

        // 表头样式
        :deep(.ant-table-thead > tr > th) {
            background: var(--permission-table-header-bg) !important;
            color: var(--permission-table-header-color) !important;
            border-bottom: 1px solid var(--permission-table-border-color) !important;
            font-weight: 600;
            font-size: 14px;
            padding: 16px 12px;
            transition: all 0.3s ease;
        }

        // 表格主体行样式
        :deep(.ant-table-tbody > tr) {
            background: var(--permission-bg-primary) !important;
            // border-bottom: 1px solid var(--permission-table-border-color) !important;
            transition: all 0.3s ease;

            &:hover {
                background: var(--permission-table-row-hover-bg) !important;
            }
        }

        // 表格单元格样式
        :deep(.ant-table-tbody > tr > td) {
            background: transparent !important;
            color: var(--permission-text-primary) !important;
            // border-bottom: 1px solid var(--permission-table-border-color) !important;
            padding: 12px;
            transition: all 0.3s ease;
        }

        // 悬停效果
        :deep(.ant-table-tbody > tr:hover > td) {
            background: var(--permission-table-row-hover-bg) !important;
            color: var(--permission-text-primary) !important;
        }

        // 分页组件样式
        :deep(.ant-pagination) {
            background: var(--permission-bg-primary);
            color: var(--permission-text-primary);
            padding: 10px !important;
            margin: 0;

            .ant-pagination-item {
                background: var(--permission-bg-secondary);
                border: 1px solid var(--permission-border-primary);
                color: var(--permission-text-primary);

                &:hover {
                    background: var(--permission-table-row-hover-bg);
                    border-color: var(--permission-primary-color);
                }

                &.ant-pagination-item-active {
                    background: var(--permission-primary-color);
                    border-color: var(--permission-primary-color);
                    color: var(--permission-text-inverse);
                }
            }

            .ant-pagination-prev,
            .ant-pagination-next {
                background: var(--permission-bg-secondary);
                border: 1px solid var(--permission-border-primary);
                color: var(--permission-text-primary);

                &:hover {
                    background: var(--permission-table-row-hover-bg);
                    border-color: var(--permission-primary-color);
                    color: var(--permission-primary-color);
                }
            }

            .ant-pagination-jump-prev,
            .ant-pagination-jump-next {
                color: var(--permission-text-secondary);

                &:hover {
                    color: var(--permission-primary-color);
                }
            }

            .ant-pagination-options {
                .ant-select {
                    .ant-select-selector {
                        background: var(--permission-bg-secondary);
                        border: 1px solid var(--permission-border-primary);
                        color: var(--permission-text-primary);
                    }
                }
            }

            .ant-pagination-total-text {
                color: var(--permission-text-secondary);
            }
        }

        // 加载状态样式
        :deep(.ant-spin-nested-loading) {
            .ant-spin {
                .ant-spin-dot {
                    i {
                        background-color: var(--permission-primary-color);
                    }
                }
            }
        }
    }

    // 操作按钮样式
    :deep(.ant-btn-link) {
        color: var(--permission-primary-color) !important;
        padding: 4px 8px;
        height: auto;
        font-size: 12px;

        &:hover {
            color: var(--permission-primary-hover) !important;
            background: var(--permission-bg-secondary);
        }

        &.ant-btn-dangerous {
            color: var(--permission-danger-color) !important;

            &:hover {
                color: var(--permission-danger-hover) !important;
                background: var(--permission-bg-secondary);
            }
        }
    }

    // 标签样式优化
    :deep(.ant-tag) {
        border: 1px solid var(--permission-border-primary);
        font-size: 12px;
        padding: 2px 8px;
        border-radius: 4px;

        &.ant-tag-green {
            background: var(--permission-success-color);
            color: var(--permission-text-inverse);
            border-color: var(--permission-success-color);
        }

        &.ant-tag-red {
            background: var(--permission-danger-color);
            color: var(--permission-text-inverse);
            border-color: var(--permission-danger-color);
        }

        &.ant-tag-orange {
            background: var(--permission-warning-color);
            color: var(--permission-text-inverse);
            border-color: var(--permission-warning-color);
        }

        &.ant-tag-blue {
            background: var(--permission-primary-color);
            color: var(--permission-text-inverse);
            border-color: var(--permission-primary-color);
        }
    }
}

.permission-name {
    display: flex;
    align-items: center;
    gap: 12px;

    &__content {
        flex: 1;
    }

    &__title {
        font-weight: 500;
        color: var(--permission-text-primary);
        margin-bottom: 4px;
        font-size: 14px;
    }

    &__desc {
        font-size: 12px;
        color: var(--permission-text-secondary);
    }
}

.route-info {
    &__title {
        font-weight: 500;
        color: var(--permission-text-primary);
        margin-bottom: 4px;
        font-size: 14px;
    }

    &__name {
        font-size: 12px;
        color: var(--permission-text-secondary);
        font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    }
}

.icon-display {
    display: flex;
    align-items: center;
    gap: 8px;

    &__svg {
        width: 16px;
        height: 16px;
        color: var(--permission-icon-color);
        font-size: 16px;
    }

    &__name {
        font-size: 12px;
        color: var(--permission-text-secondary);
        font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    }
}

.no-icon {
    color: var(--permission-text-disabled);
    font-size: 12px;
    font-style: italic;
}

// 路由路径标签样式
.route-path-tag {
    background: var(--permission-bg-secondary) !important;
    color: var(--permission-text-primary) !important;
    border: 1px solid var(--permission-border-primary) !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
}
